package com.vhall.component.controller.rbac.facade;

import com.vhall.component.entity.rbac.vo.UserAddRoleReqVO;
import com.vhall.component.entity.rbac.vo.UserDeleteRoleReqVO;
import com.vhall.component.entity.rbac.vo.UserGetAccessListReqVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * 用户
 *
 * @author longzhen.gong
 * @date 2021/6/10 17:23
 */
@FeignClient(name = "RbacUserFacade", path = "/v4/rbac/user/")
public interface RbacUserFacade {

    /**
     * 获获取用户权限列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("获取用户权限列表")
    @GetMapping(value = "get-access-list")
    List<Integer> getAccessList(@Validated UserGetAccessListReqVO reqVO);

    /**
     * 增加用户角色
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("增加用户角色")
    @PostMapping(value = "add-role")
    Boolean addRole(@Validated UserAddRoleReqVO reqVO);

    /**
     * 删除用户角色
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @ApiOperation("删除用户角色")
    @PostMapping(value = "delete-role")
    Boolean deleteRoleAction(@Validated UserDeleteRoleReqVO reqVO);

}
